SlideShare a Scribd company logo
1 of 34
Download to read offline
begin
    RailsWayCon.new
    ...
Zusammenfassung der Ruby on Rails
     Konferenz 2009 in Berlin

                       Daniel Mattes, 4. Juni 2009
Über mich
      Daniel Mattes
             Angestellter bei der BurdaWireless GmbH



      email: dm@actsasblog.de
      http://www.xing.com/profile/Daniel_Mattes2
      http://www.actsasblog.de




04.06.2009                   RailsWayCon 2009          2
Agenda
      Asynchronous Processing in Ruby
      HAML/SASS/COMPASS
      JRuby
      Rails Performance
      Frontend Optimization
      jQuery
      …others



04.06.2009             RailsWayCon 2009   3
Asynchronous Processing in Ruby
      Title: The State of Asynchronous
      Processing in Ruby - Mathias Meyer
      Slides:
      http://www.paperplanes.de/2009/5/27/rails
      waycon_slides.html
      Links
             http://github.com/ezmobius/nanite/tree/master
             http://www.rabbitmq.com/
             http://github.com/tobi/delayed_job/tree/master

04.06.2009                     RailsWayCon 2009               4
Asynchronous Processing in Ruby
      When?
             Requests are taking too long
             Tasks on a certain time
             Longer running tasks




04.06.2009                    RailsWayCon 2009   5
Asynchronous Processing in Ruby
      Nanite (the big one)
             Using RabbitMQ
             Scalling
      Build in error/exceptions reports
      Recommendations
             simple
               delayed_jobs
             distributed
               When using EC2 -> Amazon SQS
             heavy load, scalable
               Nanite/RabbitMQ
04.06.2009                       RailsWayCon 2009   6
HAML/SASS/COMPASS
      Title: Show the Frontend some Love:
      HAML and SASS - Jan Krutisch
      Slides:
      http://www.slideshare.net/jan_mindmatters
      /haml-sass-and-compass
      Links
             http://haml.hamptoncatlin.com/
             http://haml.hamptoncatlin.com/docs/rdoc



04.06.2009                    RailsWayCon 2009         7
HAML
      ERB                                        HAML
<div id='content'>                       #content
  <div class='left column'>                .left.column
    <h2>Welcome to our                       %h2 Welcome to our site!
   site!</h2>                                %p= print_information
    <p>                                    .right.column= render
       <%= print_information %>             :partial => quot;sidebarquot;
    </p>
  </div>
  <div class=quot;right columnquot;>
    <%= render :partial =>
   quot;sidebarquot; %>
  </div>
</div>




04.06.2009                    RailsWayCon 2009                          8
HAML
      HAML
             outputs beautiful code
             gem install haml
             automatically creates self-closing tags for img, br,...
             attributes
                 ruby hash syntax: %head{ :language => 'german'}
             &     html_escape
                 can be set as default
             ==    interpolates ruby strings
             -=    don't output, e. g. for .each
             automated id generation: %li[obj]   <li id=obj.id.....
             /   output html comments
             you can migrate your erb step by step
04.06.2009                               RailsWayCon 2009              9
SASS
      SASS                                            CSS
  !main_bg= #46ar12
   !main_width= 40em                          #main {
                                                  background-color: #46a312;
    #main                                         width: 40em; }
      :background-color= !main_bg                 #main .sidebar {
      :width= !main_width                           background-color: #79d645;
      .sidebar                                      width: 15em; }
        :background-color= !main_bg +
     #333333
        :width= !main_width - 25em




04.06.2009                         RailsWayCon 2009                              10
SASS
      SASS
             installation: its included in haml
             you can create nested styles
             you can create constants
             can do calculations
             mixins, by using = for definition, + for usage
             you can use loops




04.06.2009                      RailsWayCon 2009              11
COMPASS
      COMPASS = CSS-Framework




04.06.2009         RailsWayCon 2009   12
Migration to JRuby
      Title: The Pleasure and Pain of Migrating
      to jRuby - Steven Bristol

      Why switch?
             performance
             scalability
             java api




04.06.2009                 RailsWayCon 2009       13
Migration to JRuby
      Problems:
             Gems like ferret, file_column        take other
             solutions
             Deployment with Glassfish
               Complicated
               much slower than with mongrel
      Recommendation
             If you don‘t need to convert your hole app,
             just build a small application which exposes a
             rest interface.

04.06.2009                     RailsWayCon 2009                14
Rails Performance
      Title: Rails Performance - Michael
      Koziarski
      first focus to frontend performance
             yslow: http://developer.yahoo.com/yslow/
             javascript_include_tag:defaults, :cache =>
             true
               My suggestion
                  http://github.com/yolk/rucksack/tree/master
                  It‘s a packer like asset_package, asset_compressor
             sprite your images:
             http://websitetips.com/articles/css/sprites/
04.06.2009                         RailsWayCon 2009                    15
Rails Performance
      1. What is slow?
             heavily used?
             cache
               etags
               last updated header
               Expires header
                  browser don't look for a specific time
               fresh_when




04.06.2009                          RailsWayCon 2009       16
Rails Performance
      2. Why is it slow?
             performance tests
               rake test:benchmark
               NewRelic RPM: http://www.newrelic.com/
               Fiveruns Tuneup: http://www.fiveruns.com/
               http://github.com/dsboulder/query_reviewer/tree/m
               aster




04.06.2009                      RailsWayCon 2009               17
Rails Performance
      3. Improve it
             often used image      create image tag
             manually
             look at url generators
             look at garbage collection
               RUBY_HEAP_MIN_SLOTS
               RUBY_GC_MALLOC_LIMIT
               RUBY_HEAP_FREE_MIN




04.06.2009                     RailsWayCon 2009       18
Rails Performance
      At least…
             you can start to cache, scale, db
             partitioning,…
             http://railslab.newrelic.com/scaling-rails




04.06.2009                      RailsWayCon 2009          19
Frontend Optimazation
      Title: Boost your Website's Performance
      with Frontend Optimization - Ralph von
      der Heyden
      Slides:
      http://www.slideshare.net/ralphvdh/front-
      end-performance-railswaycon-2009-short-
      talk




04.06.2009             RailsWayCon 2009           20
Frontend Optimazation
      Why?
             e. g. Amazon sells 1% less stuff per 100ms
             more loading time
      Backend: 10 % loading time
      Frontend: 90 % loading time
      Who?
             Fewer Requests
             Smaller Requests
             Speed up Requests

04.06.2009                    RailsWayCon 2009            21
Frontend Optimazation
      Fewer requests
             Join CSS/Javascripts
             Sprite images
             expires header




04.06.2009                   RailsWayCon 2009   22
Frontend Optimazation
      Smaller requests
             gzip your text
               Apache: mod_deflate
             minify js and css
             images
               png is usually smaller than gif
               strip JPG meta data
               http://smush.it/




04.06.2009                       RailsWayCon 2009   23
Frontend Optimazation
      Speed up requests
             most browsers load 2 files per host
             Multiple domains for static content
             Rails: Set 4 asset hosts    8 parallel
             downloads
             config.action_controller.asset_host =
             „http://assets%d.foobar.com“
             Content Delivery Networks for static files




04.06.2009                     RailsWayCon 2009           24
Frontend Optimazation
      Tools?
             Firebug
             YSlow




04.06.2009             RailsWayCon 2009   25
jQuery
      Title: jQuery with Rails - Yehuda Katz
      Slides: http://yehudakatz.com/wp-
      content/uploads/2009/05/jquerytutorial.pdf
      Links
             http://docs.jquery.com/Main_Page
      Why?
             Write less, do more!
             Separation of JavaScript and HTML
             A lot of plugins

04.06.2009                   RailsWayCon 2009      26
jQuery
      Observer
        $(“h1”).click(function() {
            $(this).fadeIn();
        });

      Selectors
             #id, element, .class, class.class
             parent, child, prev, next
             :first, :last, :not(..)
             [attribute=value]

        $(quot;input[name='newsletter']quot;).next().text(quot; is
          newsletterquot;);


04.06.2009                     RailsWayCon 2009          27
jQuery
      Traversal
             $(“div”).attr(“id”, “hello”)
             $(“div”).removeAttr(“id”);
             $(“div”).addClass(“foo”)
             $(“div”).toggleClass(“foo”)
             $(“div”).html(“<p>Hello</p>”)
      Manipulation
             $(“div”).append(“<p>Hello</p>”)
             $(“<p>Hello</p>”).insertAfter(“div”)


04.06.2009                     RailsWayCon 2009     28
jQuery
      $(document).ready(function() { ... })

      $(“div”).bind(“click”, function() { ... })
         Alias: $(“div”).click(function() { ... })

      $(“div”).hover(function() { ... }, function() { ... })

      $(“div”).toggle(function() { ... }, function() { ... })

      $(“div”).live(“click”, function() { ... })
04.06.2009                    RailsWayCon 2009                  29
jQuery
      $(“div”).fadeIn()
      $(“div”).fadeOut(“slow”)
      $(“div”).slideUp(200)
      $(“div”).slideDown(“slow”)
      $(“div”).animate({height: “toggle”, opacity:
      “toggle”})
      $(“div”).animate({fontSize: “24px”, opacity:
      0.5}, {easing: “expo”})


04.06.2009              RailsWayCon 2009         30
Others
      Ruby sittin on the Couch - Alexander Lang
             http://www.slideshare.net/langalex/ruby-sittin-
             on-the-couch

             it uses javascript
             restful http interface
             it scales
               optimistic locking
               replication
             written in erlang
             it saves json

04.06.2009                          RailsWayCon 2009           31
Others
      From Rails to Rack: Making Rails 3 a
      better Ruby Citizen - Yehuda Katz
             http://pivotallabs.com/users/woosley/blog/artic
             les/878-from-rails-to-rack-making-rails-3-a-
             better-ruby-citizen-yehuda-katz-
             Features
               Middleware
               rack-tests
               different ORMs (ActiveRecord, DataMapper,…)
               Javascript no more Prototype-specefic (jQuery,
               Mootools,…)
               faster Filters and Controllers

04.06.2009                      RailsWayCon 2009                32
Others
      Ruby/Rails in the Enterprise - Maik
      Schmidt
             xml
               use libxml for xml operations
                   implemented in c
                   very fast
                   you can validate by schema
             internationalization




04.06.2009                         RailsWayCon 2009   33
...
        rescue TimeLimitExceeded
          puts quot;...habe fertig!quot;
          puts quot;danke ;-)quot;
        end




04.06.2009         RailsWayCon 2009   34

More Related Content

Viewers also liked

MongoDB on Rails (and Ruby)
MongoDB on Rails (and Ruby)MongoDB on Rails (and Ruby)
MongoDB on Rails (and Ruby)jan_mindmatters
 
Ruby for Artists and Tinkerers. A non-presentation.
Ruby for Artists and Tinkerers. A non-presentation.Ruby for Artists and Tinkerers. A non-presentation.
Ruby for Artists and Tinkerers. A non-presentation.jan_mindmatters
 
realtime audio on ze web @ hhjs
realtime audio on ze web @ hhjsrealtime audio on ze web @ hhjs
realtime audio on ze web @ hhjsjan_mindmatters
 
Railsrumble railscamphh 2010
Railsrumble railscamphh 2010Railsrumble railscamphh 2010
Railsrumble railscamphh 2010jan_mindmatters
 
Werkconferentie 3D: Cumulatief onderzoek 3 d’s en 309 online participatiemoni...
Werkconferentie 3D: Cumulatief onderzoek 3 d’s en 309 online participatiemoni...Werkconferentie 3D: Cumulatief onderzoek 3 d’s en 309 online participatiemoni...
Werkconferentie 3D: Cumulatief onderzoek 3 d’s en 309 online participatiemoni...KING
 
Mongodb on Ruby And Rails (froscon 2010)
Mongodb on Ruby And Rails (froscon 2010)Mongodb on Ruby And Rails (froscon 2010)
Mongodb on Ruby And Rails (froscon 2010)jan_mindmatters
 

Viewers also liked (7)

Mongodb railscamphh
Mongodb railscamphhMongodb railscamphh
Mongodb railscamphh
 
MongoDB on Rails (and Ruby)
MongoDB on Rails (and Ruby)MongoDB on Rails (and Ruby)
MongoDB on Rails (and Ruby)
 
Ruby for Artists and Tinkerers. A non-presentation.
Ruby for Artists and Tinkerers. A non-presentation.Ruby for Artists and Tinkerers. A non-presentation.
Ruby for Artists and Tinkerers. A non-presentation.
 
realtime audio on ze web @ hhjs
realtime audio on ze web @ hhjsrealtime audio on ze web @ hhjs
realtime audio on ze web @ hhjs
 
Railsrumble railscamphh 2010
Railsrumble railscamphh 2010Railsrumble railscamphh 2010
Railsrumble railscamphh 2010
 
Werkconferentie 3D: Cumulatief onderzoek 3 d’s en 309 online participatiemoni...
Werkconferentie 3D: Cumulatief onderzoek 3 d’s en 309 online participatiemoni...Werkconferentie 3D: Cumulatief onderzoek 3 d’s en 309 online participatiemoni...
Werkconferentie 3D: Cumulatief onderzoek 3 d’s en 309 online participatiemoni...
 
Mongodb on Ruby And Rails (froscon 2010)
Mongodb on Ruby And Rails (froscon 2010)Mongodb on Ruby And Rails (froscon 2010)
Mongodb on Ruby And Rails (froscon 2010)
 

Similar to RailsWayCon 2009 Summary

Performance on Rails
Performance on RailsPerformance on Rails
Performance on RailsPedro Sousa
 
Ruby off Rails (english)
Ruby off Rails (english)Ruby off Rails (english)
Ruby off Rails (english)Stoyan Zhekov
 
Killing the Angle Bracket
Killing the Angle BracketKilling the Angle Bracket
Killing the Angle Bracketjnewmanux
 
Ruby on Rails workshop for beginner
Ruby on Rails workshop for beginnerRuby on Rails workshop for beginner
Ruby on Rails workshop for beginnerUmair Amjad
 
Consegi 2010 - Dicas de Desenvolvimento Web com Ruby
Consegi 2010 - Dicas de Desenvolvimento Web com RubyConsegi 2010 - Dicas de Desenvolvimento Web com Ruby
Consegi 2010 - Dicas de Desenvolvimento Web com RubyFabio Akita
 
Building Application with Ruby On Rails Framework
Building Application with Ruby On Rails FrameworkBuilding Application with Ruby On Rails Framework
Building Application with Ruby On Rails FrameworkEdureka!
 
Web application intro + a bit of ruby (revised)
Web application intro + a bit of ruby (revised)Web application intro + a bit of ruby (revised)
Web application intro + a bit of ruby (revised)Tobias Pfeiffer
 
Merb For The Enterprise
Merb For The EnterpriseMerb For The Enterprise
Merb For The EnterpriseMatt Aimonetti
 
JRuby on Rails Deployment: What They Didn't Tell You
JRuby on Rails Deployment: What They Didn't Tell YouJRuby on Rails Deployment: What They Didn't Tell You
JRuby on Rails Deployment: What They Didn't Tell Youelliando dias
 
Building Application With Ruby On Rails Framework
Building Application With Ruby On Rails FrameworkBuilding Application With Ruby On Rails Framework
Building Application With Ruby On Rails FrameworkVineet Chaturvedi
 
Jaoo Michael Neale 09
Jaoo Michael Neale 09Jaoo Michael Neale 09
Jaoo Michael Neale 09Michael Neale
 
Viridians on Rails
Viridians on RailsViridians on Rails
Viridians on RailsViridians
 
Instruments ruby on rails
Instruments ruby on railsInstruments ruby on rails
Instruments ruby on railspmashchak
 
Fisl 11 - Dicas de Desenvolvimento Web com Ruby
Fisl 11 - Dicas de Desenvolvimento Web com RubyFisl 11 - Dicas de Desenvolvimento Web com Ruby
Fisl 11 - Dicas de Desenvolvimento Web com RubyFabio Akita
 
Ruby On Rails Seminar Basis Softexpo Feb2010
Ruby On Rails Seminar Basis Softexpo Feb2010Ruby On Rails Seminar Basis Softexpo Feb2010
Ruby On Rails Seminar Basis Softexpo Feb2010arif44
 
Front-end optimisation & jQuery Internals
Front-end optimisation & jQuery InternalsFront-end optimisation & jQuery Internals
Front-end optimisation & jQuery InternalsArtur Cistov
 

Similar to RailsWayCon 2009 Summary (20)

Performance on Rails
Performance on RailsPerformance on Rails
Performance on Rails
 
Ruby off Rails (english)
Ruby off Rails (english)Ruby off Rails (english)
Ruby off Rails (english)
 
Killing the Angle Bracket
Killing the Angle BracketKilling the Angle Bracket
Killing the Angle Bracket
 
Ruby on Rails workshop for beginner
Ruby on Rails workshop for beginnerRuby on Rails workshop for beginner
Ruby on Rails workshop for beginner
 
Consegi 2010 - Dicas de Desenvolvimento Web com Ruby
Consegi 2010 - Dicas de Desenvolvimento Web com RubyConsegi 2010 - Dicas de Desenvolvimento Web com Ruby
Consegi 2010 - Dicas de Desenvolvimento Web com Ruby
 
Building Application with Ruby On Rails Framework
Building Application with Ruby On Rails FrameworkBuilding Application with Ruby On Rails Framework
Building Application with Ruby On Rails Framework
 
Web application intro + a bit of ruby (revised)
Web application intro + a bit of ruby (revised)Web application intro + a bit of ruby (revised)
Web application intro + a bit of ruby (revised)
 
Merb For The Enterprise
Merb For The EnterpriseMerb For The Enterprise
Merb For The Enterprise
 
JRuby on Rails Deployment: What They Didn't Tell You
JRuby on Rails Deployment: What They Didn't Tell YouJRuby on Rails Deployment: What They Didn't Tell You
JRuby on Rails Deployment: What They Didn't Tell You
 
Building Application With Ruby On Rails Framework
Building Application With Ruby On Rails FrameworkBuilding Application With Ruby On Rails Framework
Building Application With Ruby On Rails Framework
 
Jaoo Michael Neale 09
Jaoo Michael Neale 09Jaoo Michael Neale 09
Jaoo Michael Neale 09
 
Viridians on Rails
Viridians on RailsViridians on Rails
Viridians on Rails
 
Web application intro
Web application introWeb application intro
Web application intro
 
Devops on serverless
Devops on serverlessDevops on serverless
Devops on serverless
 
Instruments ruby on rails
Instruments ruby on railsInstruments ruby on rails
Instruments ruby on rails
 
Html5 tx - preso
Html5 tx - presoHtml5 tx - preso
Html5 tx - preso
 
Fisl 11 - Dicas de Desenvolvimento Web com Ruby
Fisl 11 - Dicas de Desenvolvimento Web com RubyFisl 11 - Dicas de Desenvolvimento Web com Ruby
Fisl 11 - Dicas de Desenvolvimento Web com Ruby
 
Ruby On Rails Seminar Basis Softexpo Feb2010
Ruby On Rails Seminar Basis Softexpo Feb2010Ruby On Rails Seminar Basis Softexpo Feb2010
Ruby On Rails Seminar Basis Softexpo Feb2010
 
Front-end optimisation & jQuery Internals
Front-end optimisation & jQuery InternalsFront-end optimisation & jQuery Internals
Front-end optimisation & jQuery Internals
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
 

Recently uploaded

Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 

Recently uploaded (20)

Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 

RailsWayCon 2009 Summary

  • 1. begin RailsWayCon.new ... Zusammenfassung der Ruby on Rails Konferenz 2009 in Berlin Daniel Mattes, 4. Juni 2009
  • 2. Über mich Daniel Mattes Angestellter bei der BurdaWireless GmbH email: dm@actsasblog.de http://www.xing.com/profile/Daniel_Mattes2 http://www.actsasblog.de 04.06.2009 RailsWayCon 2009 2
  • 3. Agenda Asynchronous Processing in Ruby HAML/SASS/COMPASS JRuby Rails Performance Frontend Optimization jQuery …others 04.06.2009 RailsWayCon 2009 3
  • 4. Asynchronous Processing in Ruby Title: The State of Asynchronous Processing in Ruby - Mathias Meyer Slides: http://www.paperplanes.de/2009/5/27/rails waycon_slides.html Links http://github.com/ezmobius/nanite/tree/master http://www.rabbitmq.com/ http://github.com/tobi/delayed_job/tree/master 04.06.2009 RailsWayCon 2009 4
  • 5. Asynchronous Processing in Ruby When? Requests are taking too long Tasks on a certain time Longer running tasks 04.06.2009 RailsWayCon 2009 5
  • 6. Asynchronous Processing in Ruby Nanite (the big one) Using RabbitMQ Scalling Build in error/exceptions reports Recommendations simple delayed_jobs distributed When using EC2 -> Amazon SQS heavy load, scalable Nanite/RabbitMQ 04.06.2009 RailsWayCon 2009 6
  • 7. HAML/SASS/COMPASS Title: Show the Frontend some Love: HAML and SASS - Jan Krutisch Slides: http://www.slideshare.net/jan_mindmatters /haml-sass-and-compass Links http://haml.hamptoncatlin.com/ http://haml.hamptoncatlin.com/docs/rdoc 04.06.2009 RailsWayCon 2009 7
  • 8. HAML ERB HAML <div id='content'> #content <div class='left column'> .left.column <h2>Welcome to our %h2 Welcome to our site! site!</h2> %p= print_information <p> .right.column= render <%= print_information %> :partial => quot;sidebarquot; </p> </div> <div class=quot;right columnquot;> <%= render :partial => quot;sidebarquot; %> </div> </div> 04.06.2009 RailsWayCon 2009 8
  • 9. HAML HAML outputs beautiful code gem install haml automatically creates self-closing tags for img, br,... attributes ruby hash syntax: %head{ :language => 'german'} & html_escape can be set as default == interpolates ruby strings -= don't output, e. g. for .each automated id generation: %li[obj] <li id=obj.id..... / output html comments you can migrate your erb step by step 04.06.2009 RailsWayCon 2009 9
  • 10. SASS SASS CSS !main_bg= #46ar12 !main_width= 40em #main { background-color: #46a312; #main width: 40em; } :background-color= !main_bg #main .sidebar { :width= !main_width background-color: #79d645; .sidebar width: 15em; } :background-color= !main_bg + #333333 :width= !main_width - 25em 04.06.2009 RailsWayCon 2009 10
  • 11. SASS SASS installation: its included in haml you can create nested styles you can create constants can do calculations mixins, by using = for definition, + for usage you can use loops 04.06.2009 RailsWayCon 2009 11
  • 12. COMPASS COMPASS = CSS-Framework 04.06.2009 RailsWayCon 2009 12
  • 13. Migration to JRuby Title: The Pleasure and Pain of Migrating to jRuby - Steven Bristol Why switch? performance scalability java api 04.06.2009 RailsWayCon 2009 13
  • 14. Migration to JRuby Problems: Gems like ferret, file_column take other solutions Deployment with Glassfish Complicated much slower than with mongrel Recommendation If you don‘t need to convert your hole app, just build a small application which exposes a rest interface. 04.06.2009 RailsWayCon 2009 14
  • 15. Rails Performance Title: Rails Performance - Michael Koziarski first focus to frontend performance yslow: http://developer.yahoo.com/yslow/ javascript_include_tag:defaults, :cache => true My suggestion http://github.com/yolk/rucksack/tree/master It‘s a packer like asset_package, asset_compressor sprite your images: http://websitetips.com/articles/css/sprites/ 04.06.2009 RailsWayCon 2009 15
  • 16. Rails Performance 1. What is slow? heavily used? cache etags last updated header Expires header browser don't look for a specific time fresh_when 04.06.2009 RailsWayCon 2009 16
  • 17. Rails Performance 2. Why is it slow? performance tests rake test:benchmark NewRelic RPM: http://www.newrelic.com/ Fiveruns Tuneup: http://www.fiveruns.com/ http://github.com/dsboulder/query_reviewer/tree/m aster 04.06.2009 RailsWayCon 2009 17
  • 18. Rails Performance 3. Improve it often used image create image tag manually look at url generators look at garbage collection RUBY_HEAP_MIN_SLOTS RUBY_GC_MALLOC_LIMIT RUBY_HEAP_FREE_MIN 04.06.2009 RailsWayCon 2009 18
  • 19. Rails Performance At least… you can start to cache, scale, db partitioning,… http://railslab.newrelic.com/scaling-rails 04.06.2009 RailsWayCon 2009 19
  • 20. Frontend Optimazation Title: Boost your Website's Performance with Frontend Optimization - Ralph von der Heyden Slides: http://www.slideshare.net/ralphvdh/front- end-performance-railswaycon-2009-short- talk 04.06.2009 RailsWayCon 2009 20
  • 21. Frontend Optimazation Why? e. g. Amazon sells 1% less stuff per 100ms more loading time Backend: 10 % loading time Frontend: 90 % loading time Who? Fewer Requests Smaller Requests Speed up Requests 04.06.2009 RailsWayCon 2009 21
  • 22. Frontend Optimazation Fewer requests Join CSS/Javascripts Sprite images expires header 04.06.2009 RailsWayCon 2009 22
  • 23. Frontend Optimazation Smaller requests gzip your text Apache: mod_deflate minify js and css images png is usually smaller than gif strip JPG meta data http://smush.it/ 04.06.2009 RailsWayCon 2009 23
  • 24. Frontend Optimazation Speed up requests most browsers load 2 files per host Multiple domains for static content Rails: Set 4 asset hosts 8 parallel downloads config.action_controller.asset_host = „http://assets%d.foobar.com“ Content Delivery Networks for static files 04.06.2009 RailsWayCon 2009 24
  • 25. Frontend Optimazation Tools? Firebug YSlow 04.06.2009 RailsWayCon 2009 25
  • 26. jQuery Title: jQuery with Rails - Yehuda Katz Slides: http://yehudakatz.com/wp- content/uploads/2009/05/jquerytutorial.pdf Links http://docs.jquery.com/Main_Page Why? Write less, do more! Separation of JavaScript and HTML A lot of plugins 04.06.2009 RailsWayCon 2009 26
  • 27. jQuery Observer $(“h1”).click(function() { $(this).fadeIn(); }); Selectors #id, element, .class, class.class parent, child, prev, next :first, :last, :not(..) [attribute=value] $(quot;input[name='newsletter']quot;).next().text(quot; is newsletterquot;); 04.06.2009 RailsWayCon 2009 27
  • 28. jQuery Traversal $(“div”).attr(“id”, “hello”) $(“div”).removeAttr(“id”); $(“div”).addClass(“foo”) $(“div”).toggleClass(“foo”) $(“div”).html(“<p>Hello</p>”) Manipulation $(“div”).append(“<p>Hello</p>”) $(“<p>Hello</p>”).insertAfter(“div”) 04.06.2009 RailsWayCon 2009 28
  • 29. jQuery $(document).ready(function() { ... }) $(“div”).bind(“click”, function() { ... }) Alias: $(“div”).click(function() { ... }) $(“div”).hover(function() { ... }, function() { ... }) $(“div”).toggle(function() { ... }, function() { ... }) $(“div”).live(“click”, function() { ... }) 04.06.2009 RailsWayCon 2009 29
  • 30. jQuery $(“div”).fadeIn() $(“div”).fadeOut(“slow”) $(“div”).slideUp(200) $(“div”).slideDown(“slow”) $(“div”).animate({height: “toggle”, opacity: “toggle”}) $(“div”).animate({fontSize: “24px”, opacity: 0.5}, {easing: “expo”}) 04.06.2009 RailsWayCon 2009 30
  • 31. Others Ruby sittin on the Couch - Alexander Lang http://www.slideshare.net/langalex/ruby-sittin- on-the-couch it uses javascript restful http interface it scales optimistic locking replication written in erlang it saves json 04.06.2009 RailsWayCon 2009 31
  • 32. Others From Rails to Rack: Making Rails 3 a better Ruby Citizen - Yehuda Katz http://pivotallabs.com/users/woosley/blog/artic les/878-from-rails-to-rack-making-rails-3-a- better-ruby-citizen-yehuda-katz- Features Middleware rack-tests different ORMs (ActiveRecord, DataMapper,…) Javascript no more Prototype-specefic (jQuery, Mootools,…) faster Filters and Controllers 04.06.2009 RailsWayCon 2009 32
  • 33. Others Ruby/Rails in the Enterprise - Maik Schmidt xml use libxml for xml operations implemented in c very fast you can validate by schema internationalization 04.06.2009 RailsWayCon 2009 33
  • 34. ... rescue TimeLimitExceeded puts quot;...habe fertig!quot; puts quot;danke ;-)quot; end 04.06.2009 RailsWayCon 2009 34